< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03120201.xhp

(section: space) (bookmark: bm_id3150499)
Space function

Space 関数

Space Function [Runtime]
Space 関数 [実行時](hd_id3150499.1)

Returns a string that consists of a specified amount of spaces.
スペース記号を指定された数繰り返した文字列を返します。(par_id3154927.2)

(/section: space)

Syntax:
構文:(hd_id3153394.3)

Space (n As Long)
Space (n As Integer)(par_id3143267.4)

Return value:
戻り値:(hd_id3147242.5)

String
文字列(par_id3149233.6)

Parameters:
パラメータ:(hd_id3156152.7)

n: Numeric expression that defines the number of spaces in the string. The maximum allowed value of n is 65535.
n:スペース記号の繰り返し数を指定するための数値表式。(par_id3143228.8)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3154760.9)

Sub ExampleSpace
Sub ExampleSpace(par_id3147560.10)

Dim sText As String,sOut As String
Dim sText As String,sOut As String(par_id3149670.11)

DIm iLen As Integer
DIm iLen As Integer(par_id3154938.12)

iLen = 10
iLen = 10(par_id3153525.13)

sText = "Las Vegas"
sText = "Las Vegas"(par_id3151211.14)

sOut = sText & Space(iLen) & sText & Chr(13) &_
sOut = sText & Space(iLen) & sText & Chr(13) &_(par_id3156282.15)

sText & Space(iLen*2) & sText & Chr(13) &_
sText & Space(iLen*2) & sText & Chr(13) &_(par_id3144760.16)

sText & Space(iLen*4) & sText & Chr(13)
sText & Space(iLen*4) & sText & Chr(13)(par_id3159149.17)

msgBox sOut,0,"Info:"
msgBox sOut,0,"Info:"(par_id3154216.18)

End Sub
End Sub(par_id3158409.19)


< Prev / Next >